<%@ include file="/common/taglibs.jsp"%>

<head>
<title><fmt:message key="createBirth.title" /></title>
<script type="text/javascript" src="scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="scripts/datetimepicker.js">
	//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
	//Script featured on JavaScript Kit (http://www.javascriptkit.com)
	//For this script, visit http://www.javascriptkit.com
</script>
<style type="text/css">

div.two_col_left_box {
	float: left;
	padding: 0px;
	width: 380px;
	border: 0px solid gray;
}

div.two_col_right_box {
	float: right;
	padding: 0px;
	width: 380px;
	border: 0px solid gray;
}

div.three_col_left_box {
	float: left;
	padding: 0px;
	width: 270px;
	border: 0px solid gray;
}

div.three_col_mid_box {
	float: left;
	padding: 0px;
	width: 270px;
	border: 0px solid gray;
}

div.three_col_mid_box_half {
	float: left;
	padding: 0px;
	margin-left: 10px;
	width: 80px;
	border: 0px solid gray;
}

div.three_col_right_box {
	float: left;
	padding: 0px;
	width: 220px;
	border: 0px solid gray;
}

div.form_row {
	width: 860px;
	padding: 1px;
	overflow: hidden;
	border: 0px solid gray;
	margin-top: 5px;
}

div.section_header {
	width: 840px;
	height: 26px;
	color: #FFFAFA;
	display: table-cell;
	vertical-align: middle;
	background-color: #545454;
	padding: 0 5px 2px;
	font-family: serif;
	font-size: 14px;
}
</style>
</head>

<body class="updateDeliveryStatus" />

<div class="span12">
	<s:form name="updateDeliveryForm" action="updateDelivery.action"
		enctype="multipart/form-data" method="post" validate="true"
		cssClass="well form-vertical">
		<s:hidden key="birth.id" />
		<s:hidden key="birth.status" />
		<s:hidden key="zoneId" />
		<s:hidden key="id" />
		<input type="hidden" name="from" value="${param.from}" />

		<div class="section_header">
			<b>SEARCH USING REFERENCE ID OR E-GOVERNANCE REGISTRATION ID</b>
		</div>

		<div class="form_row">
			<div class="three_col_left_box">
				<s:textfield key="birth.searchRefId" />
			</div>

			<div class="three_col_mid_box">
				<s:textfield key="birth.searchRegistrationId" />
			</div>

			<div class="three_col_right_box"></div>

		</div>

		<div class="form_row">
			<div class="three_col_left_box"></div>

			<div class="three_col_mid_box"></div>

			<div class="three_col_right_box"></div>
		</div>

		<s:if test="%{birthList.size() > 0}">

			<display:table name="birthList" cellspacing="0" cellpadding="0"
				requestURI="" defaultsort="1" pagesize="5" export="false"
				class="table table-condensed" style="width: 99%">

				<display:column property="motherName" escapeXml="true"
					titleKey="birth.motherName" style="width: 20%" paramId="id"
					paramProperty="id" />

				<display:column property="fatherName" escapeXml="true"
					sortable="false" titleKey="birth.fatherName" style="width: 20%" />
				<display:column property="status" escapeXml="true" sortable="false"
					title="Status" style="width: 10%" />
				<display:column property="sex" sortable="false" titleKey="birth.sex"
					style="width: 10%" autolink="true" media="html" />
				<display:column property="birthDate" sortable="false"
					titleKey="birth.birthDate" style="width: 35%" autolink="true"
					media="html" />
				<display:setProperty name="paging.banner.all_items_found" value="" />
				<display:setProperty name="paging.banner.some_items_found" value="" />
				<display:setProperty name="paging.banner.full" value="" />
				<display:setProperty name="paging.banner.first" value="" />
			</display:table>

			<div class="form_row">
				<div class="three_col_left_box">
					<fieldset class="control-group">
						<label class="control-label"> Date :</label>
						<div class="controls">
							<input id="bd12" name="birth.cerDeliveryDate" type="text"
								readonly="readonly" size="25" title="date"
								contenteditable="false" value="${birth.cerDeliveryDate}">
							<a href="javascript:NewCal('bd12','ddmmmyyyy',false,24)"><img
								src="images/cal.gif" width="16" height="16" border="0"
								alt="Pick date and time"> </a>
						</div>
					</fieldset>
				</div>

				<div class="three_col_mid_box">
					<s:select name="birth.cerDeliveryType" key="birth.cerDeliveryType"
						list="#{'Hand Delivery':'Hand Delivery','Courier':'Courier'}"
						required="true"></s:select>
				</div>

			</div>
		</s:if>
		<fieldset class="form-actions">
			
			<s:submit key="button.search" method="searchBirthForDeliveryUpdate"
				cssClass="btn btn-primary" theme="simple" />
				
			<s:if test="%{birthList.size() > 0}">
				<s:submit key="button.update" cssClass="btn btn-primary"
					theme="simple" method="updateCertificateDeliveryDetails"/>
			</s:if>
			
			<s:submit key="button.cancel" method="cancel" cssClass="btn"
				theme="simple" />
		</fieldset>
	</s:form>

</div>

